package controllers.admin

import controllers.{AssetsFinder, checkAdmin}
import javax.inject._
import play.api.mvc._

import scala.concurrent.ExecutionContext

/**
 * This controller creates an `Action` to handle HTTP requests to the
 * application's home page.
 */
@Singleton
class AdminController @Inject()(cc: ControllerComponents)(implicit exec: ExecutionContext,parser: BodyParsers.Default)
  extends AbstractController(cc) {
  implicit val myCustomCharset = Codec.javaSupported("gb18030")
  /**
   * Create an Action to render an HTML page with a welcome message.
   * The configuration in the `routes` file means that this method
   * will be called when the application receives a `GET` request with
   * a path of `/`.
   */
  def index() = checkAdmin(parser,exec){ implicit request =>
          Ok(views.html.admin.index("manageui_index"))

  }

}
